The following two aspects are well known as a method of controlling a robot for carrying out a spot welding. A first is a method comprising the steps of, in the mentioned order, (1) detecting the completion of a positioning action for a spot welding; (2) issuing a gun pressurization command to a spot welding gun; (3) detecting the input of a pressurization completion signal from the spot welding gun; and (4) performing a welding operation by the spot welding gun through the issue of the welding command. A second is a method comprising the steps of (1) issuing a gun pressurization command before detecting the completion of the positioning action for the spot welding (that is, during the positioning action for the spot welding; (2) detecting the input of a gun pressurization completion signal; (3) issuing a welding command to execute a welding operation by a spot welding gun.
The robot control method according to the second aspect will now be described with reference to a timing chart in FIG. 5. In the timing chart, a gun pressurization command designated at (b) is a pressurization command for allowing the spot welding gun to be ready for a welding operation; and a welding command designated at (c) is a command for allowing the spot welding gun to perform an actual welding action based on welding conditions such as current and voltage to be applied which are preset in a robot controller. Both the commands are sent to the spot welding gun from the robot controller. A welding completion signal designated at (d) is a confirmation signal which is sent to the robot controller from the robot welding gun at the point when the welding operation has been fully completed; and a pressurization completion signal designated at (e) is a confirmation signal to be outputted to the robot controller by the spot welding gun for which completion of pressurization has been detected.
In the timing chart in FIG. 5, during the positioning action for the spot welding (before the completion of the positioning action at time t2), the gun pressurization command is issued in advance (at time t1), and the input of the pressurization completion signal is detected (at time t3) to issue the welding command for welding operation. After detecting the welding completion signal from the spot welding gun (at time t4), a positioning action for the next welding point will be started after a predetermined standby period (until the time t5).
According to the known control method, for the gun to be used, the time period between the time at which the pressurization command has been issued to the relevant gun, and the time at which the pressurization completion signal is obtained following the completion of the pressurization, is estimated and stored previously in the controller as the expected time T0 required for the pressurization. Then, prior to starting of the positioning action for the spot welding, the movement time T (a time elapsed from time t0 time t2) required for the positioning of the robot will be calculated based on the distance L to the target position and the data of commanded moving speed F of the robot. Afterwards, there is calculated a difference (T-T0) between the movement time T and the expected time T0 required for pressurization which has been stored in the robot controller. Thus, the time to issue the gun pressurization command (setting of the time t1) is so determined as to be capable of receiving a pressurization completion signal from the gun immediately after the completion of the positioning of the robot. More specifically, by allowing the gun pressurization command to be issued at the point (t1) at which the time period (T-T0) has elapsed starting from the point (t0) at which the positioning action is started, the point (t2) at which the expected time (T0) required for pressurization has elapsed from that point (t1) is made to coincide with the point of positioning completion (T-T0+T0=T).
In such a conventional control method, however, the value of the expected time T0 required for pressurization to be set in the robot controller has been exclusively determined depending on the experience of the user side. This may bring about a problem such that, even though the expected time required for pressurization is estimated to be T0, as shown in FIG. 5, for example, if the value T0 is smaller than the actual time T0' (T0&lt;T0') required for pressurization, then the welding command is not permitted to be issued until a certain time has elapsed from the time of completion of the positioning action (time t2) of the robot, causing problems such as prolongation of total operating time. On the other hand, if the expected time t0 required pressurization is larger than the actual time T0' (T0&gt;T0') required for pressurization, the welding command will be issued untimely prior to the completion of the positioning action of the robot to start the welding operation, which may hinder satisfactory performance of welding operation.